package com.example.seckill.auth.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author HL
 * 暴露秒杀地址
 */
@Getter
@Setter
@ToString
public class Exposer {

    /**
     * 是否开启秒杀
     */
    private boolean exposed;

    /**
     * 加密措施
     */
    private String md5;

    /**
     * id
     */
    private Long seckillId;

    /**
     * 系统当前时间
     */
    private Long now = 0L;

    /**
     * 开启时间
     */
    private Long start = 0L;

    /**
     * 结束时间
     */
    private Long end = 0L;

    public Exposer(boolean exposed, String md5, Long seckillId) {
        this.exposed = exposed;
        this.md5 = md5;
        this.seckillId = seckillId;
    }

    public Exposer(boolean exposed, Long seckillId, Long now, Long start, Long end) {
        this.exposed = exposed;
        this.seckillId = seckillId;
        this.now = now;
        this.start = start;
        this.end = end;
    }

    public Exposer(boolean exposed, Long seckillId) {
        this.exposed = exposed;
        this.seckillId = seckillId;
    }
}
